package info.niwota.js;

import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class CounterOutputStream extends FilterOutputStream {

	private int count = 0;

	public CounterOutputStream(OutputStream out) {
			super(out);
	}

	@Override
	public void write(int b) throws IOException {
		super.write(b);
		count ++;
	}

	public int getCount() {
		return count;
	}
}
